package com.neusoft.springboot06.Controller;

import com.neusoft.springboot06.domain.Items;
import com.neusoft.springboot06.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ItemsController {

    @Autowired
    private ItemService itemService;

    @RequestMapping("/findItems.do")
    @ResponseBody
    public Items QueryItems(Integer id)
    {
        return itemService.finditemsByID(id);
    }
}
